import {request,RequestConfig,HttpRequestMethod,LengyuHttpResponse,PageRequestParam,download,upload,uploadBigFile}  from '../../utils/request'


export interface GameInstance{
  id: string;
  name?: string;
  image?:string,
  mysticFlag:number,
  raidFlag:number
  instanceVersion?:string,
  season?:number,
  plus1Time?:string,
  plus2Time?:string,
  plus3Time?:string,
  monsterList?:Monster[],
  createTime?:string,
  updateTime?:string,
}

export interface Monster{
  id: string;
  name: string;
  imageUrl:string;
  //所属副本
  instanceId:string;
  //是否boss 1:boss 2小怪 3：大怪
  bossType:number;
  //几号boss
  bossIndex:number;
  //整体攻略
  gonglve:string;
  showSkillFlag:boolean;
  skillList:MonsterSkill[];
  dropList:MonsterDrop[]
}


export interface MonsterSkill{
  id: string;
  name: string;
  imageUrl:string
  monsterId:string
  shuoming:string
  gonglve:string
  
}

export interface MonsterDrop {
  id: string;
  name: string;
  image:string
}

// 将微信用户信息保存到数据库
export function getInstanceDetail(instanceId:string): Promise<LengyuHttpResponse> {
  let requestConfig:RequestConfig={
    url:'/game-instance/detail?instanceId='+instanceId,
    method:HttpRequestMethod.POST,
    token:true,
  }
  return request(requestConfig);
}


export function list(param:GameInstance): Promise<LengyuHttpResponse> {
  let requestConfig:RequestConfig={
    url:'/game-instance/list',
    method:HttpRequestMethod.POST,
    data:param,
    token:true,
  }
  return request(requestConfig);
}